#include<iostream>
#include<unordered_map>
using namespace std;
const int N = 2e5 + 10;
int a[N];
int b[N];
int n, m;
unordered_map<int, int>mp;
int main()
{
	cin >> n >> m;
	for (int i = 0; i < n; i++) {
		int x;
		cin >> x;
		mp[x] = 1;
	}
	int ans = 0;
	int x;
	for (int i = 0; i < m; i++) {
		cin >> x;
		if (mp[x]) {
			ans++;
		}
	}
	if (m / 2 <= ans) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}